package cn.hongyu.mapper;

import cn.hongyu.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;


public interface UserMapper {
    @Select("select * from user")
    public List<User> findAll();

    @Select("select * from user where id=#{id}")
    public List<User> findById(Long id);

    @Update("update user set username=#{username},password=#{password} where id=#{id}")
    public void updateUser(User user);

    @Insert("insert into user values(#{id},#{username},#{password},#{birthday})")
    public void save(User user);

    @Delete("delete from user where id=#{id}")
    public void delete(Long id);



}
